package frsf.cidisi.exercise.tp2_ia.situationCalculus;

import frsf.cidisi.faia.agent.Action;
import frsf.cidisi.faia.agent.ActionFactory;

import frsf.cidisi.exercise.tp2_ia.situationCalculus.actions.*;



public class ComputersMarketActionFactory extends ActionFactory {

    private static ComputersMarketActionFactory instance;

    private ComputersMarketActionFactory() {
    }

    public static ComputersMarketActionFactory getInstance() {
        if (instance == null) {
            instance = new ComputersMarketActionFactory();
        }
        return instance;
    }

    @Override
    protected String endActionString() {
        return "noAction";
    }

   
     @Override
   	 protected Action stringToAction(String stringAction) {
        Action actionObject = null;
        
	if (stringAction.equals("requestForecastRequest")) {
            actionObject = new Request_ForecastRequest();
        } else if (stringAction.equals("informPOSForecast")) {
            actionObject = new Inform_POSForecast();
        } else if (stringAction.equals("cancelDemandForecast")) {
            actionObject = new Cancel_DemandForecast();
        } else if (stringAction.equals("acceptProposalDemandForecastResponse")) {
            actionObject = new AcceptProposal_DemFResponse();
        } else if (stringAction.equals("proposeUpdatedDemandForecast")) {
            actionObject = new Propose_UpdatedDemForecast();
        } else if (stringAction.equals("informPlannedEvents")) {
            actionObject = new Inform_PlannedEvents();
        } else if (stringAction.equals("endSubprocess3")) {
            actionObject = new EndSubprocess_3();
        } else if (stringAction.equals("endEventGoal")) {
            actionObject = new EndEvent_Goal();

        }
        
        return actionObject;
    }
}
